package com.itheima.d2_collection_traverse;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionTest1 {
    public static void main(String[] args) {
        Collection<Movie> movies =new ArrayList<>();
        movies.add(new Movie("1213",99.1,"22"));
        movies.add(new Movie("231",21.1,"212"));
        movies.add(new Movie("213",32.4,"21"));

        System.out.println(movies);

        for (Movie movie : movies) {
            System.out.println(movie.getName());
            System.out.println(movie.getScore());
            System.out.println(movie.getDirector());
            System.out.println("---------");
        }

    }

}
